package com.zytlifeservice.repository.pay;

import com.zytlifeservice.domain.pay.MoblieAndFlowCost;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 话费与流量
 * Created by Administrator on 2017/6/3.
 */
@Repository
public interface MoblieAndFlowCostRepository extends JpaRepository<MoblieAndFlowCost, Long> {

    @Query(value = "select  id,par_value,price,type from moblie_and_flow_cost where type=1", nativeQuery = true)
    public List<MoblieAndFlowCost> findFlowCost();

    @Query(value = "select  id,par_value,price,type from moblie_and_flow_cost where type=0", nativeQuery = true)
    public List<MoblieAndFlowCost> findMoblieCost();

    public List<MoblieAndFlowCost> findAll();

}
